<?php

abstract class ForumIds
{
    function __toString()
    {
        return 'ForumIds';
    }
    const id1	= 2;	//法律英语培训
    const id2	= 3;	//司法考试专区
    const id3	= 4;	//律师事务专区
    const id4	= 8;	//海外律师实务
    const id5	= 7;	//律师实习实训
    const id6	= 9;	//律师海外交流
    const id7	= 11;	//法制论坛
    const id8	= 12;	//维权论到

}

/******************************/
//url stat
//Username : jingshilaw 
//Password : qwe123


//QQ:
//http://wp.qq.com/index.html
define("QQ_NUMBER", "2317590863");
define("ARTICLE_SHOW_NUMBER", 10);
define("ADMIN_SHOW_NUMBER", 20);
/******************************/

$topicArr = Array(
0 => Array(100, 0, 1, "律校概况", 1),	//ID PARENT LEVEL Name Attrible (1 is show article / 2 will show article list)
1 => Array(101, 100, 2, "律校简介", 1),
2 => Array(102, 100, 2, "顾问委员会", 1),
3 => Array(103, 100, 2, "学校出版物", 2),
4 => Array(104, 100, 2, "", 0),
5 => Array(105, 100, 2, "", 0),
6 => Array(106, 100, 2, "", 0),
7 => Array(107, 100, 2, "", 0),
8 => Array(108, 100, 2, "", 0),
9 => Array(109, 100, 2, "", 0),

10 => Array(200, 0, 1, "学校新闻", 2),
11 => Array(201, 200, 2, "" ,0),
12 => Array(202, 200, 2, "" ,0),
13 => Array(203, 200, 2, "" ,0),
14 => Array(204, 200, 2, "" ,0),
15 => Array(205, 200, 2, "" ,0),
16 => Array(206, 200, 2, "" ,0),
17 => Array(207, 200, 2, "" ,0),
18 => Array(208, 200, 2, "" ,0),
19 => Array(209, 200, 2, "" ,0),

20 => Array(300, 0, 1, "师资队伍" ,1),
21 => Array(301, 300, 2, "" ,0),
22 => Array(302, 300, 2, "" ,0),
23 => Array(303, 300, 2, "" ,0),
24 => Array(304, 300, 2, "" ,0),
25 => Array(305, 300, 2, "" ,0),
26 => Array(306, 300, 2, "" ,0),
27 => Array(307, 300, 2, "" ,0),
28 => Array(308, 300, 2, "" ,0),
29 => Array(309, 300, 2, "" ,0),

30 => Array(400, 0, 1, "国际合作交流" ,1),
31 => Array(401, 400, 2, "" ,0),
32 => Array(402, 400, 2, "" ,0),
33 => Array(403, 400, 2, "" ,0),
34 => Array(404, 400, 2, "" ,0),
35 => Array(405, 400, 2, "" ,0),
36 => Array(406, 400, 2, "" ,0),
37 => Array(407, 400, 2, "" ,0),
38 => Array(408, 400, 2, "" ,0),
39 => Array(409, 400, 2, "" ,0),

40 => Array(500, 0, 1, "法制动态" ,2),
41 => Array(501, 500, 2, "" ,0),
42 => Array(502, 500, 2, "" ,0),
43 => Array(503, 500, 2, "" ,0),
44 => Array(504, 500, 2, "" ,0),
45 => Array(505, 500, 2, "" ,0),
46 => Array(506, 500, 2, "" ,0),
47 => Array(507, 500, 2, "" ,0),
48 => Array(508, 500, 2, "" ,0),
49 => Array(509, 500, 2, "" ,0),

50 => Array(600, 0, 1, "公告" ,2),
51 => Array(601, 600, 2, "" ,0),
52 => Array(602, 600, 2, "" ,0),
53 => Array(603, 600, 2, "" ,0),
54 => Array(604, 600, 2, "" ,0),
55 => Array(605, 600, 2, "" ,0),
56 => Array(606, 600, 2, "" ,0),
57 => Array(607, 600, 2, "" ,0),
58 => Array(608, 600, 2, "" ,0),
59 => Array(609, 600, 2, "" ,0),

60 => Array(700, 0, 1, "业务领域" ,2),
61 => Array(701, 700, 2, "法律英语培训" ,1),
62 => Array(702, 700, 2, "京师学堂" ,1),
63 => Array(703, 700, 2, "司法考试专区" ,1),
64 => Array(704, 700, 2, "律师事务专区" ,1),
65 => Array(705, 704, 3, "海外律师实务"),
66 => Array(706, 704, 3, "律师实习实训"),
67 => Array(707, 704, 3, "律师海外交流"),
68 => Array(708, 700, 2, ""),
69 => Array(709, 700, 2, ""),

70 => Array(800, 0, 1, "联系我们" ,1),
71 => Array(801, 800, 2, "" ,0),
72 => Array(802, 800, 2, "" ,0),
73 => Array(803, 800, 2, "" ,0),
74 => Array(804, 800, 2, "" ,0),
75 => Array(805, 800, 2, "" ,0),
76 => Array(806, 800, 2, "" ,0),
77 => Array(807, 800, 2, "" ,0),
78 => Array(808, 800, 2, "" ,0),
79 => Array(809, 800, 2, "" ,0),

80 => Array(900, 0, 1, "招生就业" ,1),
81 => Array(901, 900, 2, "招生简章" ,2),
82 => Array(902, 900, 2, "就业信息" ,2),
83 => Array(903, 900, 2, "" ,0),
84 => Array(904, 900, 2, "" ,0),
85 => Array(905, 900, 2, "" ,0),
86 => Array(906, 900, 2, "" ,0),
87 => Array(907, 900, 2, "" ,0),
88 => Array(908, 900, 2, "" ,0),
89 => Array(909, 900, 2, "" ,0),

90 => Array(1000, 0, 1, "招贤纳士" ,1),
91 => Array(1001, 1000, 2, "" ,2),
92 => Array(1002, 1000, 2, "" ,2),
93 => Array(1003, 1000, 2, "" ,0),
94 => Array(1004, 1000, 2, "" ,0),
95 => Array(1005, 1000, 2, "" ,0),
96 => Array(1006, 1000, 2, "" ,0),
97 => Array(1007, 1000, 2, "" ,0),
98 => Array(1008, 1000, 2, "" ,0),
99 => Array(1009, 1000, 2, "" ,0)
);

$applicant_name = "在线报名";

function getDescFromTopics($topic_id)
{
	global $topicArr;
	for($i = 0; $i < count($topicArr); $i++){
		if($topic_id == $topicArr[$i][0]){
			return $topicArr[$i];
		}
	}
}

function getTopicNameById($topicArr, $id)
{
	for($i = 0; $i < count($topicArr); $i++){
		if($id == $topicArr[$i][0]){
			return $topicArr[$i][3];
		}
	}
}

function getPath($topiccode)
{
	global $topicArr;
	for($i = 0; $i < count($topicArr); $i++){
		if($topiccode == $topicArr[$i][0]){
			$path = "<a href=\"/index.php\">首页</a> &gt; ";
			
			//get level
			if($topicArr[$i][2] == 2)	// 
			{
				$id2 = $topicArr[$i][1];
				for($x = 0; $x < count($topicArr); $x++){
					if($id2 == $topicArr[$x][0]){
						$path.= "<a href=\"/topic.php?id=".$topicArr[$x][0]."\">" . $topicArr[$x][3] . "</a> &gt; ";
					}
				}
			}
			
			//get level
			if($topicArr[$i][2] == 3)	// 
			{
				$path.= "<a href=\"/topic.php?id=".$topicArr[60][0]."\">" . $topicArr[60][3] . "</a> &gt; ";
				
				$id2 = $topicArr[$i][1];
				for($x = 0; $x < count($topicArr); $x++){
					if($id2 == $topicArr[$x][0]){
						$path.= "<a href=\"/topic.php?id=".$topicArr[$x][0]."\">" . $topicArr[$x][3] . "</a> &gt; ";
					}
				}
			}
			
			$path.= "<a href=\"/topic.php?id=".$topicArr[$i][0]."\"><span class=\"CurrentSection\">".$topicArr[$i][3]."</span></a>";
			
			return $path;
		}
	}
}

function getTopicBanner($topicid)
{
	switch($topicid)
	{
		case 100:
			return "/images/banner/100.jpg";
		
		case 101:#
			return "/images/banner/100.jpg";
		
		case 102:#
			return "/images/banner/100.jpg";
		
		case 103:#
			return "/images/banner/100.jpg";
		
		case 200:#
			return "/images/banner/200.jpg";
		
		case 300:#
			return "/images/banner/300.jpg";
		
		//case 400:??
		//	return "/images/banner/400.jpg";
		
		//case 500:
		//	return "/images/banner/500.jpg";
		
		//case 600:
		//	return "/images/banner/600.jpg";
		
		case 700:#
			return "/images/banner/700.jpg";
		
		case 701:#
			return "/images/banner/700.jpg";
		
		case 702:#
			return "/images/banner/700.jpg";
		
		case 703:#
			return "/images/banner/700.jpg";
		
		case 704:#
			return "/images/banner/700.jpg";
		
		case 800:#
			return "/images/banner/800.jpg";
		
		default:
			return "/images/banner/lv2page.jpg";
	}
}
?>